using System;
using FluentNHibernate.Automapping;
using FluentNHibernate.Automapping.Alterations;
using MvcMall.Core.Domains;

namespace MvcMall.Data.NHibernateMaps
{
    public class UserAddressMap : IAutoMappingOverride<UserAddress>
    {
        public void Override(AutoMapping<UserAddress> mapping)
        {
            mapping.Table("UserAddresses");

            mapping.References(c => c.Country).Column("Country");
            mapping.References(c => c.Province).Column("Province");
            mapping.References(c => c.City).Column("City");
            mapping.References(c => c.District).Column("District");
            mapping.References(c => c.User);
        }
    }
}